//
//  Utilities.swift
//  EY.Mtel_ProjectTemplate_Swift
//
//  Created by zxj on 2020/7/27.
//  Copyright © 2020 EY.Mtel. All rights reserved.
//

import UIKit

class Utilities: NSObject {
    static var shared: Utilities = Utilities()
    var token: String? {
        set {
            let defaults = UserDefaults.standard
            if newValue == nil {
                defaults.removeObject(forKey: "token")
            } else {
                defaults.set(newValue, forKey: "token")
            }
            defaults.synchronize()
        }
        get {
            let defaults = UserDefaults.standard
            return defaults.string(forKey: "token")
        }
    }

}
